package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the CONTACTSDAY database table.
 * 
 */
@Entity
@NamedQuery(name="Contactsday.findAll", query="SELECT c FROM Contactsday c")
public class Contactsday implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="CONTACTSDAY_CDAYID_GENERATOR", sequenceName="SEQ_15")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CONTACTSDAY_CDAYID_GENERATOR")
	@Column(name="CDAY_ID")
	private long cdayId;

	@Temporal(TemporalType.DATE)
	private Date anniversary;

	@Column(name="C_CUST_ID")
	private BigDecimal cCustId;

	@Column(name="CDAY_KINDSJ")
	private BigDecimal cdayKindsj;

	@Column(name="CONT_NAME")
	private String contName;

	@Temporal(TemporalType.DATE)
	@Column(name="CUST_CREATEDATA3")
	private Date custCreatedata3;

	@Column(name="CUST_NAME")
	private String custName;

	@Temporal(TemporalType.DATE)
	@Column(name="NEXT_REMIND")
	private Date nextRemind;

	//bi-directional many-to-one association to Contact
	@OneToMany(mappedBy="contactsday")
	private List<Contact> contacts;

	//bi-directional many-to-one association to Contact
	@ManyToOne
	@JoinColumn(name="CONT_ID")
	private Contact contact;

	//bi-directional many-to-one association to Customerlog
	@OneToMany(mappedBy="contactsday")
	private List<Customerlog> customerlogs;

	public Contactsday() {
	}

	public long getCdayId() {
		return this.cdayId;
	}

	public void setCdayId(long cdayId) {
		this.cdayId = cdayId;
	}

	public Date getAnniversary() {
		return this.anniversary;
	}

	public void setAnniversary(Date anniversary) {
		this.anniversary = anniversary;
	}

	public BigDecimal getCCustId() {
		return this.cCustId;
	}

	public void setCCustId(BigDecimal cCustId) {
		this.cCustId = cCustId;
	}

	public BigDecimal getCdayKindsj() {
		return this.cdayKindsj;
	}

	public void setCdayKindsj(BigDecimal cdayKindsj) {
		this.cdayKindsj = cdayKindsj;
	}

	public String getContName() {
		return this.contName;
	}

	public void setContName(String contName) {
		this.contName = contName;
	}

	public Date getCustCreatedata3() {
		return this.custCreatedata3;
	}

	public void setCustCreatedata3(Date custCreatedata3) {
		this.custCreatedata3 = custCreatedata3;
	}

	public String getCustName() {
		return this.custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public Date getNextRemind() {
		return this.nextRemind;
	}

	public void setNextRemind(Date nextRemind) {
		this.nextRemind = nextRemind;
	}

	public List<Contact> getContacts() {
		return this.contacts;
	}

	public void setContacts(List<Contact> contacts) {
		this.contacts = contacts;
	}

	public Contact addContact(Contact contact) {
		getContacts().add(contact);
		contact.setContactsday(this);

		return contact;
	}

	public Contact removeContact(Contact contact) {
		getContacts().remove(contact);
		contact.setContactsday(null);

		return contact;
	}

	public Contact getContact() {
		return this.contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

	public List<Customerlog> getCustomerlogs() {
		return this.customerlogs;
	}

	public void setCustomerlogs(List<Customerlog> customerlogs) {
		this.customerlogs = customerlogs;
	}

	public Customerlog addCustomerlog(Customerlog customerlog) {
		getCustomerlogs().add(customerlog);
		customerlog.setContactsday(this);

		return customerlog;
	}

	public Customerlog removeCustomerlog(Customerlog customerlog) {
		getCustomerlogs().remove(customerlog);
		customerlog.setContactsday(null);

		return customerlog;
	}

}